<template>
    <a-form ref="formRef" :model="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 18 }">
        <a-form-item label="角色名称" :rules="rules.name" name="name">
            <a-input v-model:value="form.name" placeholder="请输入角色名称" />
        </a-form-item>
        <a-form-item label="角色描述" name="des">
            <a-textarea v-model:value="form.des" placeholder="请输入角色描述" />
        </a-form-item>
    </a-form>
</template>
<script setup>
import { ref, reactive } from 'vue'
import { useForm } from '@iframe/tools/mixins/FormMixins'
const { validate, getForm, setForm } = useForm()

const formRef = ref()
const form = reactive({})
const rules = reactive({
    name: { required: true, message: '请输入角色名称' }
})
defineExpose({ validate: validate(formRef), getForm: getForm(form), setForm: setForm(form) })
</script>
